#ifndef CPU_INFO_H_INCLUDED
#define CPU_INFO_H_INCLUDED

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <dirent.h>
#include <time.h>
#include <sys/utsname.h>
#include <sys/sysinfo.h>


#define NAME "NAME"
#define VERSION "VERSION"
#define PRETTY_NAME "PRETTY_NAME"

typedef struct CPU_PACKED
{
    char name[20];
    unsigned int user;
    unsigned int nice;
    unsigned int system;
    unsigned int idle;
    unsigned int iowait;
    unsigned int irq;
    unsigned int softirq;
}CPU_OCCUPY;

double get_cpu_usage();
void get_cpu_occupy_info(CPU_OCCUPY* cpu_occupy);
double  calc_cpu_occupy(CPU_OCCUPY* od,CPU_OCCUPY* no);
int get_cpu_cores();
void sys_release(char* val);
void find_release_file(char* file_name);
void sys_start_time(char* start_time,struct sysinfo* info);

#endif // CPU_INFO_H_INCLUDED
